<?php
/**
 * Created by PhpStorm.
 * User: wangan
 * Date: 2018/7/16
 * Time: 17:28
 */

namespace app\model;

use think\Model;

class User extends Model
{
    protected $table = 'user';

    public static function getByOpenID($openid){
        $user = User::where('openid', '=', $openid)
            ->find();
        return $user;
    }

}